package cn.edu.scut.suggestion.corpus;
import java.util.Vector;

/*
 * change by tian.yuchen
 */
import org.apache.lucene.index.Term;

import cn.edu.scut.hsrc.bean.CandidateWord;

/**
 * 定义了语料库中每个预料的存储格式及内容
 * @author tian.yuchen
 *
 */

public class TermInfo {
  public Term term;
  public int docFreq;
  public Vector<Integer> docs;
  public Long pos;//the pos of the docs_record in the file.
  public double idf;
  public double normaldocfreq;
  public CandidateWord canWord;
  
  public TermInfo(Term t, int df,Vector<Integer> docs) {
    this.term = t;
    this.docFreq = df;
    this.docs=docs;
    this.pos=(long) 0;
    this.canWord=null;
  }
  
  public TermInfo(Term t, int df,double idf,double normaldocfreq,long pos) {
	    this.term = t;
	    this.docFreq = df;
	    this.pos=pos;
	    this.normaldocfreq=normaldocfreq;
	    this.idf=idf;
	    this.canWord=null;
	  }
  
  public void setCandidateWord(CandidateWord canWord){
	  this.canWord=canWord;
  }
  
  public CandidateWord getCandidateWord(){
	  return this.canWord;
  }

}
